// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import FadePanel from "./FadePanel";
import GameData from "./GameData";

const { ccclass, property } = cc._decorator;

@ccclass
export default class SceneLoad extends cc.Component {

    public static GoScene(str: string) {
        GameData.LoadScene = str;
        cc.director.loadScene("LoadScene");
    }

    protected start(): void {
        FadePanel.Instance.node.children[0].active = false;
        cc.director.loadScene(GameData.LoadScene);
    }

}
